Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Operational Control Language</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Operational_Control_Language"> <link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Operational_Control_Language rootpage-Operational_Control_Language skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Operational Control Language</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><style data-mw-deduplicate="TemplateStyles:r1305433154">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style>
<p><b>Operational Control Language</b> (OCL) is the control language of the <a href="IBM" title="IBM">IBM</a> <a href="IBM_System/3" title="IBM System/3">System/3</a>, <a href="IBM_System/32" title="IBM System/32">System/32</a>, <a href="IBM_System/34" title="IBM System/34">System/34</a> and <a href="IBM_System/36" title="IBM System/36">System/36</a> <a href="Minicomputer" title="Minicomputer">minicomputer</a> family. It is supported on <a href="IBM_i" title="IBM i">IBM i</a>'s System/36 Environment for backwards compatibility purposes. It is similar to the older control languages <a href="Job_Control_Language" title="Job Control Language">JCL</a> (<a href="IBM_System/370" title="IBM System/370">System/370</a>), and unrelated to the later <a href="Control_Language" title="Control Language">Control Language</a> (<a href="IBM_System/38" title="IBM System/38">System/38</a> and <a href="IBM_AS/400" title="IBM AS/400">IBM AS/400</a>), and <a href="Rexx" title="Rexx">REXX</a> (AS/400).
</p>
<div class="mw-heading mw-heading2"><h2 id="Overview">Overview</h2></div>
<p>OCL statements are used to directly load user or system programs into memory, assign system resources to them, and transfer system control to them in a process called execution. The fact that a program is stored on a computer's disk drive does not in itself cause the computer to process or execute the program.
</p><p>OCL statements can be entered manually from the keyboard, but are generally stored as a procedure member. A procedure member is a freely editable member within a library, it is a source file. On the S/32, S/34, and S/36, procedures are not compiled, they are <a href="Interpreted_language" class="mw-redirect" title="Interpreted language">interpreted</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Example">Example</h2></div>
<p>OCL statements usually begin with two slashes and at least one space character. Here's an example of a procedure stored on a System/36 as member PROC1:
</p>
<div class="mw-highlight mw-highlight-lang-text mw-content-ltr" dir="ltr"><pre>** Procedure PROC1 Optional documentation
**
** Written by Joe User 2006-05-29
**
**
// * 'PROC1 procedure is running'
// * ' '
// IFF ACTIVE-'PROC2,PROC3' GOTO OKAY
** IFF means 'if false'
** ACTIVE-'name1,name2' means true
** if at least one of the listed programs is currently running
** GOTO xxx means skip to the statement
** that has a TAG xxx and resume processing
// PAUSE 'Cannot continue because other Payroll is running'
** Halts execution with a message
// CANCEL Stops execution of this procedure
// TAG OKAY
// IFF DATAF1-PFILE1 IFF DATAF1-PFILE2 GOTO NODELT
// * 'Caution, Pay Data Exists' Displays information on terminal
// * ' '
// * 'Press 1 to continue and DELETE existing files'
// IFF '1'=?1R? CANCEL A parameter is indicated by question marks surrounding a number
** Using 1R between question marks indicates
** that the parameter is required
** and processing waits for user input.
** CANCEL means immediately go to end of job.
// LOAD $DELET $DELET is used to delete files
// RUN
** This program requires and processes, consumes,
** succeeding statements as data up until an END statement
// IF DATAF1-PFILE1 SCRATCH UNIT-F1,LABEL-PFILE1
** Conditionally deletes an existing disk file
// IF DATAF1-PFILE2 SCRATCH UNIT-F1,LABEL-PFILE2
// END
**
// TAG NODELT
// LOAD PR101 PR101 could be an RPG or COBOL program
// FILE NAME-PAYMAST,DISP-SHR PAYMAST is the payroll master file
// FILE NAME-PFILE1,DISP-NEW,RECORDS-100,EXTEND-100
** A new file PFILE1 is created and allocated
** 100 records are assigned to PFILE1
** when all are used, the system tries to extend it by another 100
** each time it fills.
// RUN
** END statement is only necessary
** for those programs enabled
** to process any following statements as data
** Such data does not need to be formatted like OCL
// SWITCH 1XX0XXXX Causes flags U1 through U8 to be SETON (1), OFF (0), or left as previously set (X)
**
// LOCAL OFFSET-1,DATA-'PROC1' Places PROC1 in the Local Data Area (LDA)
// LOCAL OFFSET-101,DATA-'?USER?' Substitutes the operator's User ID
** LDA is accessed via a data structure, UDS within an RPG program
** LDA and User switches (flags) remain available to succeeding programs
** until set otherwise
** Called sub-procedure members and loaded program's source code needs to be examined
** as to whether or not the LDA and User switches are actually read or altered
// LOAD PR102
// FILE NAME-PAYMAST,DISP-SHR DISP-SHR means the file is shared, versus exclusive access
** Other programs can use PAYMAST at the same time
// FILE NAME-PFILE,LABEL-PFILE1 NAME/LABEL is used when the RPG file name reference
** and the actual disk file label are different
// RUN
// RETURN Return to the calling procedure, otherwise end-of-job
</pre></div>
<p>This procedure member incorporates a variety of OCL statements, also procedure control expressions (PCE), resources, that is mostly files are allocated, and several job steps, that is programs are executed.
</p><p>Comments are represented by an asterisk in column 1, and otherwise free-format. Or can be placed after the logical end of a statement, if there is no indicator for statement continuation onto the next line, like a trailing comma.
</p>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<p>IBM maintains manuals freely online and downloadable, including OCL 36.
</p>
<ul><li><a rel="nofollow" class="external text" href="http://public.dhe.ibm.com/systems/power/docs/systemi/v6r1/en_US/sc414730.pdf">"System/36 Environment Programming"</a> (1995) v6r1</li>
<li><a rel="nofollow" class="external text" href="http://public.dhe.ibm.com/systems/power/docs/systemi/v6r1/en_US/sc414731.pdf">"System/36 Environment Reference"</a> (1995) v6r1</li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2023-08-28" href="https://en.wikipedia.org/wiki/?title=Operational_Control_Language&amp;oldid=1172606760">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>